/**
 * Created by wlc on 2018/5/5.
 */
// document.ready(function () {
//
// });

window.onload = function () {
    //自适应-根据窗口高度初始化模型容器的高度
    var documentHeight = $("#systemPage-background")[0].offsetHeight;
    $("#model-container")[0].style.height = documentHeight - 62;
    //temp-test
    var siderBarList = $('#test .panel-DATA-list')[0];
    $.ajax({
        type: 'GET',
        url: '../DataPanel/listRootDir' ,
        success:function (rootDir) {
            var fileList = $('<ul class="panel-DATA-fileList"></ul>')[0];
            console.log(siderBarList.children[siderBarList.children.length-1]);
            siderBarList.insertBefore(fileList,siderBarList.children[siderBarList.children.length-1]);
            var filePath = rootDir.split(",");
            for (var i=0;i<filePath.length;i++){
                fileList.appendChild($('<li><div class="panel-DATA-fileItem"><i class="fa fa-caret-right fa-fw"></i><span>'+filePath[i]+'</span></div></li>')[0]);
            }
        }
    });
};
